package com.baixiaowen.javainterview;

import com.baixiaowen.javainterview.IOC.entity.Person;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * 开启AOP
 */
@EnableAspectJAutoProxy
@SpringBootApplication
public class JavaInterviewApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext ctx = SpringApplication.run(JavaInterviewApplication.class, args);
        Person person = ctx.getBean(Person.class);
        System.err.println("Name is " + person.getName());
        person.call();
    }

}
